<div id="draggable_teams">
<table>
	<tr>
		<td valign="top">
			<h2>expeditions teams</h2>
			<div id="expeditions_teams">
				<ul id="expeditions_teams_list">
					<% @expedition.teams.each do |team|%>
						<li class="team_li" id='<%=dom_id(team,"expeditions")%>'>
							<%=team.name%>
						</li>
						<%=draggable_element(dom_id(team,"expeditions"), :ghosting=>true, :revert=>false)%>
					<%end%>
				</ul>
			</div>
		</td>
		<td>&lt;--&gt;</td>
		<td valign="top">
			<h2>all my teams</h2>
			<div id="captains_teams">
				<ul id="captains_teams_list">
					<% (current_user.captains_teams - @expedition.teams).each do |team|%>
						<li class="team_li" id='<%=dom_id(team, "captains")%>'>
							<%=team.name%>
						</li>
						<%=draggable_element(dom_id(team, "captains"), :ghosting=>true, :revert=>false)%>
					<%end%>
				</ul>
			</div>
		</td>
	</tr>
</table>


<%= drop_receiving_element ('expeditions_teams',
				:accept   => 'team_li',
				:hoverclass => 'hover',
				:with     => "'team_id=' + encodeURIComponent(element.id.split('_').last())",
				:url      => {:controller => "expeditions", :action => "add_team"})%>

<%= drop_receiving_element ('captains_teams',
				:accept   => 'team_li',
				:hoverclass => 'hover',
				:with     => "'team_id=' + encodeURIComponent(element.id.split('_').last())",
				:url      => {:controller => "expeditions", :action => "remove_team"})%>

</div>